package com.ieheima.myproperties;

import java.util.Properties;
import java.util.Set;

public class Demo1 {
    public static void main(String[] args) {
        Properties p = new Properties();
        p.setProperty("安徽", "合肥");
        p.setProperty("江苏", "南京");
        p.setProperty("浙江", "杭州");
        System.out.println(p);
        
        /*String value = p.getProperty("安徽");
        System.out.println(value);*/

        Set<String> keys = p.stringPropertyNames();
        for (String key : keys) {
            String value = p.getProperty(key);
            System.out.println(key + "=" + value);
        }

    }
}
